package com.youzan.open.sdk.gen.v1_0_0.model;

import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import com.youzan.open.sdk.model.APIParams;
import com.youzan.open.sdk.model.ByteWrapper;
import com.youzan.open.sdk.model.FileParams;
import java.util.List;
import java.util.Map;
import java.util.Date;

public class YouzanClientAppengineAuthorizeParams implements APIParams, FileParams  {

    /**
     * 应用状态(用于为后面获取token做准备)
     */
    private String state;
    /**
     * 应用重定向url(用于为后面获取token做准备)
     */
    private String redirectUrl;
    /**
     * 店铺id
     */
    private Long kdtId;
    /**
     * 应用id
     */
    private String clientId;
    /**
     * 应用类型1.平台型2.工具型3.自用型
     */
    private Long classify;

    public void setState(String state) {
        this.state = state;
    }

    public String getState() {
        return this.state;
    }

    public void setRedirectUrl(String redirectUrl) {
        this.redirectUrl = redirectUrl;
    }

    public String getRedirectUrl() {
        return this.redirectUrl;
    }

    public void setKdtId(Long kdtId) {
        this.kdtId = kdtId;
    }

    public Long getKdtId() {
        return this.kdtId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getClientId() {
        return this.clientId;
    }

    public void setClassify(Long classify) {
        this.classify = classify;
    }

    public Long getClassify() {
        return this.classify;
    }


    public Map<String, Object> toParams() {
        Map<String, Object> params = Maps.newHashMap();
        if (state != null) {
            params.put("state", state);
        }
        if (redirectUrl != null) {
            params.put("redirect_url", redirectUrl);
        }
        if (kdtId != null) {
            params.put("kdt_id", kdtId);
        }
        if (clientId != null) {
            params.put("client_id", clientId);
        }
        if (classify != null) {
            params.put("classify", classify);
        }
        return params;
    }

    public Multimap<String, ByteWrapper> toFileParams() {
        Multimap<String, ByteWrapper> params = ArrayListMultimap.create();

            return params;
    }


}